package com.dt.dubai.sys.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;

import java.util.Date;

/*
 * 系统用户登录表
 */

@Data
@Table(name = "dt_sys_admin_login")
@EqualsAndHashCode(callSuper = false)
public class SysAdminLoginEntity extends BaseEntity {

    //手机号码
    @NotNull(message = "mobilePhone参数不能为空")
    @Length(min = 0, max = 11, message = "mobilePhone参数最大长度不11")
    String mobilePhone;

    //实名类型 0-未实名,1-个人,2-公司,3-员工
    Short realNameType;

    //昵称
    @Length(min = 0, max = 36, message = "nickNameZh参数最大长度不36")
    String nickNameZh;

    //密码
    @Length(min = 0, max = 128, message = "pwd参数最大长度不128")
    String pwd;

    //盐
    @Length(min = 0, max = 6, message = "salt参数最大长度不6")
    String salt;

    //头像地址
    @Length(min = 0, max = 36, message = "customerIcon参数最大长度不36")
    String customerIcon;

    //工作台类型 1-默认,2-员工,3-商家
    Short homePageType;

    //状态 0-正常,1-锁定,2-禁用
    Short loginStatus;

    //登录IP
    @Length(min = 0, max = 20, message = "loginIpAddr参数最大长度不20")
    String loginIpAddr;

    //登录时间
    Date loginTime;

    //管理员记录ID
    @NotNull(message = "superUserRecordId参数不能为空")
    Long superUserRecordId;


}
